<div>
    <table class="table" :loading="!window.isNaN(@paginationConfig.total) && @loading">
        <thead>
            <tr>
                <th :if="@needSelection">
                    <ms-checkbox :widget="{checked:@isAllChecked,onChange:@handleCheckAll}"></ms-checkbox>
                </th>
                <th :for="el in @columns">{{el.title}}</th>
            </tr>
        </thead>
        <tbody>
            <tr :for="($index, record) in @getCurrentPageData()">
                <td :if="@needSelection">
                    <ms-checkbox :widget="{checked:@checked.indexOf(record[@key])!=-1,onChange:function(){@handleCheck(arguments[0].target.checked,record)}}"></ms-checkbox>
                </td>
                <td :for="col in @columns" :html="col.template"></td>
            </tr>
        </tbody>
    </table>
    <div class="pull-right">
        <ms-pagination :widget="{current:@paginationConfig.current,pageSize:@paginationConfig.pageSize,total:@total,onChange:@handlePageChange}"></ms-pagination>
    </div>
    <div class="clearfix"></div>
</div>